package exception02;

public class Demo01 {
    public static void main(String[] args) throws AgeException{
        Person person = new Person(-10);
        person.setAge(30);
        System.out.println(person.getAge());

        // Exception in thread "main" exception02.AgeException: 年龄不能为-10
        //	at exception02.Person.<init>(Person.java:8)
        //	at exception02.Demo01.main(Demo01.java:5)


    }
}
